	<!-- D:/project/app/ydz-app-uniapp/static/images/fixedfoot -->
	<template>
		<view class="combody">
			<view class="itembox" @click="checkitem(0)">
				<image v-if="typeid==0" src="@/static/images/fixedfoot/ishome.png" mode=""></image>
				<image v-else src="@/static/images/fixedfoot/home.png" mode=""></image>
				<view class="itemtext" :class="typeid==0?'isitem':''">
					首页
				</view>
			</view>
			<view class="itembox" @click="checkitem(1)">
				<image v-if="typeid==1" src="@/static/images/fixedfoot/iscommunity.png" mode=""></image>
				<image v-else src="@/static/images/fixedfoot/community.png" mode=""></image>
				<view class="itemtext" :class="typeid==1?'isitem':''">
					社区
				</view>
			</view>
			<view class="itembox" @click="checkitem(2)">
				<image v-if="typeid==2" src="@/static/images/fixedfoot/isknowledge.png" mode=""></image>
				<image v-else src="@/static/images/fixedfoot/knowledge.png" mode=""></image>
				<view class="itemtext" :class="typeid==2?'isitem':''">
					知识
				</view>
			</view>
			<view class="itembox" @click="checkitem(3)">
				<image v-if="typeid==3" src="@/static/images/fixedfoot/isserve.png" mode=""></image>
				<image v-else src="@/static/images/fixedfoot/serve.png" mode=""></image>
				<view class="itemtext" :class="typeid==3?'isitem':''">
					服务
				</view>
			</view>
			<view class="itembox" @click="checkitem(4)">
				<image v-if="typeid==4" src="@/static/images/fixedfoot/ismine.png" mode=""></image>
				<image v-else src="@/static/images/fixedfoot/mine.png" mode=""></image>
				<view class="itemtext" :class="typeid==4?'isitem':''">
					我的
				</view>
			</view>
		</view>
	</template>

	<script>
		export default {
			props: ['typeid'],
			data() {
				return {

				}
			},
			methods: {
				checkitem(id) {
					if (id != this.typeid) {
						if (id == 0) {
							uni.navigateTo({
								url: `/pages/home`
							});
						} else if (id == 1) {
							uni.navigateTo({
								url: `/pages/forum/forumhome`
							});
						} else if (id == 2) {
							uni.navigateTo({
								url: `/pages/knowledge/index`
							});
						} else if (id == 3) {
							uni.navigateTo({
								url: `/pages/serve/index`
							});
						} else {
							uni.navigateTo({
								url: `/pages/mine/mine`
							});
						}
					} else {
						return
					}

				},
			}
		}
	</script>

	<style lang="scss" scoped>
		.combody {
			position: fixed;
			bottom: 0;
			height: 98rpx;
			width: 100%;
			background: #fff;
			z-index: 999;
			box-shadow: 4rpx 4rpx 16rpx 0px rgba(29, 70, 62, 0.16);
			display: flex;
			justify-content: space-between;
			box-sizing: border-box;
			padding: 9rpx 50rpx;

			.itembox {
				image {
					width: 48rpx;
					height: 48rpx;
				}

				.itemtext {
					font-size: 24rpx;
				}

				.isitem {
					color: #00977C;
				}
			}

		}
	</style>